﻿using System;
using System.Collections;
using System.Collections.Generic;
using System.Linq;
using System.Web;

namespace MyPlan.Utils
{
    public class Response : Hashtable
    {
        private static string STATUS = "status";
        private static string DATA = "data";


        public static Response NewResponse()
        {
            return new Response();
        }

        public Response Set(string key, object value)
        {
            this.Add(key, value);
            return this;
        }

        public Response Ok()
        {
            Response response = Response.NewResponse();
            response.Set(STATUS, ConstanCodes.SUCCESS);
            
            return response;
        }

        public Response Ok(object data)
        {
            Response response = Response.NewResponse();
            response.Set(STATUS, ConstanCodes.SUCCESS);
            response.Set(DATA, data);
      
            return response;
        }

        public Response ACCOUNT_PASSWORD_ERROR()
        {
            Response response = Response.NewResponse();
            response.Set(STATUS, ConstanCodes.ACCOUNT_PASSWORD_ERROR);
      
            return response;
        }




    }
}